import request from '@/utils/request'

// 查询列表
export function listSales(query) {
    return request({
        url: '/sales/list',
        method: 'get',
        params: query
    })
}

// 查询详细
export function getSales(id) {
    return request({
        url: '/sales/' + id,
        method: 'get'
    })
}

// 新增
export function addSales(data) {
    return request({
        url: '/sales',
        method: 'post',
        data: data
    })
}

// 修改
export function updateSales(data) {
    return request({
        url: '/sales',
        method: 'put',
        data: data
    })
}

// 删除
export function delSales(id) {
    return request({
        url: '/sales/' + id,
        method: 'delete'
    })
}
// 完成交易
export function complete(data) {
    return request({
        url: '/sales/complete',
        method: 'post',
        data
    })
}
//转问题
export function transferToIssue(data) {
    return request({
        url: '/sales/transferToIssue',
        method: 'post',
        data
    })
}
